body {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f0f0f0;
    font-family: Arial, sans-serif;
}

#gameCanvas {
    border: 3px solid #333;
    box-shadow: 5px 5px 10px rgba(0,0,0,0.3);
}

#score {
    font-size: 32px;
    color: #ff4444;
    margin: 20px;
}

#instructions {
    margin: 15px;
    color: #666;
}

#difficulty {
    margin-top: 20px;
}

#startBtn {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

#startBtn:disabled {
    background-color: #888;
}

#historyPanel {
    width: 250px;
    padding: 15px;
    background: #fff;
    border-right: 2px solid #ddd;
    overflow-y: auto;
}

#allPlayersPanel {
    width: 400px;
    padding: 15px;
    background: #fff;
    border-top: 2px solid #ddd;
    overflow-y: auto;
    margin-top: 20px;
}

#allPlayersTable {
    width: 100%;
    border-collapse: collapse;
}

#allPlayersTable th, #allPlayersTable td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#allPlayersTable th {
    background-color: #f2f2f2;
}

.time-tooltip {
    position: relative;
    display: inline-block;
}

.time-tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position the tooltip above the text */
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.time-tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%; /* At the bottom of the tooltip */
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.time-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}